﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="OAS.UserInfo" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
     <link href="Content/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <script src="Scripts/bootstrap-datetimepicker.js"></script>
    <script src="Scripts/bootstrap-datetimepicker.zh-CN.js"></script>

    <div class="panel panel-primary" style="margin:10px;">
        <asp:Label ID="TitleLabel" runat="server" Text="查询列表" Font-Size="X-Large" style="margin-left:10px;margin-top:30px;"></asp:Label>
        <table class="table" style="margin:10px">
            <tr>
                <th>用户账号：</th>
                <td>
                    <asp:TextBox runat="server" ID="UserAccountTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>

                <th>用户名：</th>
                <td>
                    <asp:TextBox runat="server" ID="UserNameTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>

                <th>职位：</th>
                <td>
                    <asp:TextBox runat="server" ID="TitleTextBox" Width="260" CssClass="form-control"></asp:TextBox>
                </td>
            </tr>

            <tr>
                <th>角色：</th>
                <td>
                    <asp:DropDownList runat="server" ID="RoleDropDownList" DataTextField="Description" DataValueField="Id" Width="260" CssClass="form-control"></asp:DropDownList>
                </td>

                <th>工厂：</th>
                <td>
                    <asp:DropDownList runat="server" ID="FactoryDropDownList" DataTextField="Code" DataValueField="Code" Width="260" CssClass="form-control"></asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button runat="server" Text="查询" ID="SearchButton" OnClick="SearchButton_Click" class="btn btn-success green" />               
               
                    <asp:Button ID="editable" OnClick="editable_Click" runat="server" class="btn btn-success green" Text="新增"  />
                </td>
            </tr>
        </table>

        <div class="panel-heading green" style="font-size:14px">
            <asp:Label ID="GridViewHeaderTextLabel" runat="server" Text="查询结果"></asp:Label>
        </div>

          <asp:UpdatePanel runat="server" ID="UserUpdatePanel">
                <ContentTemplate>
                    <asp:GridView CssClass="table table-bordered table-hover" runat="server" ID="UserListGridView" AutoGenerateColumns="false" OnRowCommand="UserListGridView_RowCommand">
                        <EmptyDataTemplate>
                            暂无数据
                        </EmptyDataTemplate>

                        <Columns>                           

                            <asp:BoundField DataField="UserAccount" ItemStyle-Width="80" HeaderText="用户账号" />
                            <asp:BoundField DataField="UserName" ItemStyle-Width="80" HeaderText="用户名" />
                            <asp:BoundField DataField="Title" ItemStyle-Width="90" HeaderText="职位" />
                            <asp:TemplateField HeaderText="有效性" ItemStyle-Width="95">
                                <ItemTemplate>
                                    <asp:CheckBox ID="checkbox" runat="server"  Checked='<%# Eval("IsActive") %>' Enabled="false"/>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Description" ItemStyle-Width="100" HeaderText="角色" />  
                            
                            <asp:TemplateField HeaderText="操作" ItemStyle-Width="95">
                                <ItemTemplate>
                                    <div class="btn-group">
                                        <asp:Button CommandName="Edit" CommandArgument='<%#Eval("Id") %>'  runat="server" CssClass="btn btn-success green" Text="编辑" />
                                        </div>
                                        <div class="btn-group">
                                        <asp:Button CommandName="Delete" CommandArgument='<%#Eval("Id") %>' runat="server" OnClientClick="return confirm('确定删除？')" Text="删除" CssClass="btn btn-danger" />
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>                          
                        </Columns>
                    </asp:GridView>

                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" CssClass="pager" 
                        LayoutType="Ul" 
                        PagingButtonLayoutType="UnorderedList" 
                        PagingButtonSpacing="0" 
                        CurrentPageButtonClass="active" 
                        ShowPageIndexBox="Never" 
                        PageSize="5" 
                        NumericButtonCount="5" 
                        OnPageChanged="AspNetPager1_PageChanged">
                    </webdiyer:AspNetPager>

                </ContentTemplate>
        </asp:UpdatePanel>
    </div>


</asp:Content>

